<template>
	<view
		><view class="message_box" v-for="(item, index) in dataList" :key="index">
			<view class="message_name">
				<view style="padding-bottom: 22px; background: #fff">
					<view
						><view class="titleName">患者姓名：</view
						><text>{{ item.name }}</text></view
					>
					<view
						><view class="titleName">检查日期：</view
						><text>{{ item.writeDate }}</text></view
					>
					<view
						><view class="titleName">检查科室：</view
						><text>{{ item.inDeptName }}</text></view
					>
					<view
						><view class="titleName">花费总费用：</view
						><text>{{ item.costs }}</text></view
					>
				</view>
				<!-- <view style="border-bottom: 1px solid #ccc; padding: 0"></view> -->
				<view
					style="text-align: center; border: 1px solid #ccc; font-weight: bold"
					>当前花费详细信息</view
				>
				<view
					v-for="(item1, index1) in item.list"
					:key="index1"
					style="border-bottom: 1px solid #ccc; background: #f9f9f9"
				>
					<view>
						<view
							><view class="titleName">药品：</view
							><text>{{ item1.item_name }}</text></view
						>
						<view
							><view class="titleName">中西药：</view
							><text>{{ item1.item_class }}</text></view
						>
						<view
							><view class="titleName">类别：</view
							><text>{{ item1.item_gtade }}</text></view
						>
						<view
							><view class="titleName">单位：</view
							><text>{{ item1.units }}</text></view
						>
						<view
							><view class="titleName">规格：</view
							><text>{{ item1.item_spec }}</text></view
						>
						<view
							><view class="titleName">价格：</view
							><text>{{ item1.price }}</text></view
						>
					</view>
				</view>
			</view>
		</view></view
	>
</template>

<script>
export default {
	data() {
		return {
			dataList: [],
		}
	},
	onLoad(option) {
		console.log(JSON.parse(option.parameter))
		this.dataList = JSON.parse(option.parameter)
	},
}
</script>

<style lang="scss">
page {
	background: #f3f3f3;
}
.message_box {
	display: flex;
	align-items: center;
	// background: #fff;
	margin-bottom: 20px;
	border: 1rpx solid #dbdbdb;
	.message_name {
		flex: 1;
		font-size: 30rpx;
		view {
			.titleName {
				text-align: right;
				min-width: 200rpx;
				display: inline-block;
			}

			color: rgb(182, 182, 182);
			padding: 4px;
			test {
				color: #000;
				margin-left: 40rpx;
			}
		}
	}
}
</style>